/**
 * Created by Administrator on 2017/9/20.
 */
var html5mode = false;
//var html5mode =true;

// 页面地址配置
var advertisement_view_url = 'component-shop-advertisement/view/';
var auth_view_url = 'component-shop-auth/view/';
var charge_view_url = "component-shop-charge/view/";
var news_view_url = 'component-shop-news/view/';
var recommended_view_url = 'component-shop-recommended/view/';
var saleStatistics_view_url = 'component-shop-saleStatistics/view/';
var set_view_url = 'component-shop-set/view/';
var table_view_url = 'component-shop-table/view/';
var template_view_url = 'component-template/view/';
var repair_view_url = 'component-shop-repair/view/';
var alert_url = "component-common-alert/view/";

// 接口地址配置
var authurl = "http://gw.test.shuwang.info/security/";
var info = "http://inner.gw.shuwang.info/sfcommon/eslauth/";
var deviceurl = "http://tm.test.shuwang.info/wmcallplatform/";
var merchanturl = "http://tm.test.shuwang.info/wmmerchant_info/";
var wx_jssdkurl = "http://opera.test.shuwang.info/profit/";
var uploadUrl = "http://sfcommon.test.shuwang.info/fileupload/upload/1030";
var foodinfoUrl = "http://tm.test.shuwang.info/wmfood_info/";
var adv_url = "http://tm.test.shuwang.info/advert/";
var joburl = "http://tm.test.shuwang.info/job/";
var wmoperation_infourl = "http://tm.test.shuwang.info/wmoperation-info/";
var electricity_url = "http://tm.test.shuwang.info/wmdevicecharge/";


var platformid = 1;
var environmental = "test";
var wxConfig = {
    "component_appid": "wx5b3320270066652f",
    "mer_id": "wxd58951ae0414cb55",
};

// var shopid_url=
function doClient(sucessfun, shopid) {
    var client = mqtt.connect('ws://120.27.192.219:3000');
    client.subscribe("/2/4/" + shopid);
    client.on("message", function (topic, payload) {
        sucessfun(topic, payload);
    });
    client.publish("pubtest", "hello world!");
}